fixed error in spawn setter