route handling fixes