fix reversed paths