Delete nodes when an AppInstance is deleted!

This code cause a crash.