Fixed bugs when URL was encoded before