Fix url processing exceptional cases