cd: correct cd functions