fix for pop on empty exceptions