Fixing bug with trailing slash and multiple mappings.