Fixed URL encoding bug