fixed a path bug and nullpointer crash