Added the use of spawn if it exists