Fixes serialization problem