corrected getUrl behaviour with optional parameters