fixes to extra error checks