➡ Gerunds should be used with possessive pronouns (my, your, her), and not object pronouns (me, him etc). Note that this rule is not strictly observed especially in the case of proper nouns.
✗ Incorrect: They were counting on me helping them.
✓ Correct: They were counting on my helping them.
✗ Incorrect: They insisted on me resigning the post.
✓ Correct: They insisted on my resigning the post.
➡ Certain verbs and adjectives are followed by a preposition + gerund. Examples are: think, desirous, despair, fond, confident, prevent, abstain, refrain, prohibit etc.
✗ Incorrect: I am thinking to write my autobiography.
✓ Correct: I am thinking of writing my autobiography.
✗ Incorrect: The clever girl was confident to win the first medal.
✓ Correct: The clever girl was confident of winning the first medal.
✗ Incorrect: I am hopeful to secure a loan to build my house.
✓ Correct: I am hopeful of securing a loan to build my house.
➡ Your writing will be clearer if you use parallel structures in both clauses.
✗ Incorrect: To die with honor is better than living with dishonor.
✓ Correct: To die with honor is better than to live with dishonor.
✗ Incorrect: Alice likes singing, dancing and to paint.
✓ Correct: Alice likes singing, dancing and painting.
➡ The possessive case should not be used with the gerund when the noun denotes a lifeless thing.
✗ Incorrect: There is no hope of the fog’s lifting.
✓ Correct: There is no hope of the fog lifting.