Fix for foreach of Mongo