bson fix for mongo