fix is_active where clause