do not allow cd to fail, fix #1918