Fixed invalid url trimming.