Fixing more crashing bugs