bugfixes for new mongodb version ("$set")