Various corrections to output to excel