Fixed numerous game crashing bugs