Fix wrong type of object assigned in URL constructor