Attempt to fix purgeOldMessages