fix object saving bug