Update custom spawn function.