Attempt at better path fixing