Stop issue #540 from happening

I realize that this is a very far from ideal situation, but it should fix the problem. I WILL see if I can reproduce and fix this tomorrow. Feel free to reject this if it's not a acceptable solution