Fix ABBamp restores

Writing gain=?? also enables the gain. We should ask before if the checkbox is checked before writing gain values.