Added urlencoding on some parameters