fixed a bug that use object data before saved into mongo