Fix crashing problems and bot not respawning