fixed 'active' variable reference