Fixed bug in which completed applications still had their metrics recorded