fixed nullpointererror