Fixed bug when saving a record to serialize properly.

closes #15