Fixed a bug causing mongo inner fields to be ovewritten