Fix Mongodb issues