Some changes for mongodb