Fixing bug in cd command