fix a nullPointerException