Improved formatting of gain output
Small error left in from debugging.