Fix directory lookup