Fixed app deletion when formation is destroyed.