CWD command bug fix