Made the router work correctly with/without trailing slashes.