Modified how the path for motors is discovered