I've been following a lemon cupcake recipe which involves incorporating lemon juice and zest. Also it involves adding a small dollop of lemon curd into the batter, then spooning rest of the batter into the cupcake case. It rises and comes out ok but once it has cooled, the cake comes away from the case which makes it look awful.

What am I doing wrong? This doesn't happen with any of my other cupcakes. Is it something to do with the lemon curd? Any advice would be greatly appreciated!