I have a bad 5 cent latch spring but corrected the issue by driving a 14X3 self tapping sheet metal screw through the door into the post..
I figured this would be more secure than using a bungee cord..
Maybe i could have used magnets to hold the door shut..