Fixed bug preventing sun/moon data from being written correctly.