fix bug with cd to missing directory