A preposition can be followed by a gerund, not an infinitive. For the preposition to be grammatically correct, it needs a noun as its object. Common examples of prepositions followed by gerunds include being afraid of, being good at, apologizing for, insisting on, stopping someone from, believing in, dreaming about/of, being excited about, feeling like, being nervous about, forgiving someone for, and planning on.