Fix params encoding in hash