caught some null pointer exceptions