Fix directory being entered