Fix wrong type of object assigned in URL constructor

This should also be merged into the current master.

Thanks, 
Elvin