fixed a bug related to url constructor