fixed isActive implementation