caught some undefined errors