Fixing some issues with handling of url params when having a trailing slash.