Fix for mongoDB eval function