Fixes to end_of_life conditions