fix pwd bug