fixed nullPointerException