fixed one of the crashing bugs (hopefully)