Fix directory initialization