Fixed an error in SetParameters