Fix URL encoding bug
Update to new API