update active state