Added closing when no running states.