- fixed some small possible NullPointer issues