Added test to make sure instance doesn't delete if the number of instances is less than a threshold