fix a few null pointer exception problems