ToDict fix