Fixes to url processing