Fix issue with serializing