Fix is_active logic