Bug fix to datum serialization from previous commit