update active state when changing props