make line not extend out of route