fixed bug with serialization wotkaround