fix nulllpointer exception