Fix a crashing bug on quit... bit of a weird one that I can't really explain