fixed save bug where data structures weren't being written properly