fixed NullPointer exception