urlencoded all params and fixed a typo

thanks @cweiske