fix automatic gain