Added URL encoding to fix #10