Just painted with latex pocket doors in old house. A couple hours after painting them had to use putty knife as they were painted open. They then closed by recessing into their pockets. Opened them to find paint was peeling up off edges.

How do I stop the peeling and touch up?