fix cd() regression