app: removing non-started units before removing started units.

Closes #352.