Small criminal legal aid firms to lose contracts