Fix crash when deleting with no objectives (fixes #314)