Added security unset after foreach #2131