yet another fix for cd()