Fixed bug when shutting scene manager down