improve url compatibility