fixed bug with object persistence