fix dir changing order