Budding authors would do well to remember to read their prose aloud to try to hear how a stranger might interpret their words. Remember, if a sentence can be read two ways we can count on a reader to see it the OTHER way. One way to help avoid this problem is to be very careful with the placement of subject and object, and be aware of the immediate antecedent of any modifier. For example, how would you read this sentence?
She had a boyfriend with a wooden leg, but broke it off.
Right. The funnier way.