.inflate improved error checks