Fixes to cleanup during app operation failures