Added missing encodeURIComponent
Fixes #4