Some bug fixes in routes