fixed bug with (de)serialization of singleton, formatting