Fixes bug in Mongo aggregation, and incompatibility with the Datastore library dependencies