Fixed return value of spawn