fixed pan CWD resetting issue