bugfixes in route matching