fix mongo cache bugs