fix pwd null error.