fixed a bug in the url event