new rule to detect undisposed instances and a bit more cleaning