fix mongo related stuff