Fix retention logic.