Fixed collection delete when apps are removed.