fixed a bug that endswith / of url