Fixes for route mapper to support middleware with params