fixing some bugs with the original url