Fix/error checks