(bug) new route button creates a loop route

create a new route button works with function genLoop.