fixing CWD