fixed a nullPointer