fixing Wrong Value for gain Parameter