How do I prevent this from happening again?