i added a variable called "CanGo?" that controls whether or not Mario can move. So when Mario gets a moon or goes through a doorway, he stops moving, which eliminates potential bugs.
tonynsc for the original game