Fixes for spawn