Spool - fixed error with wrong or null pipe number

Spools coding 1st phase #564