fix dynamic spawn script