Bugfix in mongo optmizations migrations