Fixed bug in saving fits output.