fix of two possible null pointer exceptions.