fixing change parent directory function