fix relative URL resolving