fixed on_spawn