Trich again! Advice please

Brittany
I tested positive for trich in April and I was treated for it with flagyl. I told my doctor that I was still having symptoms and she tested and it came back positive again! I haven't had any sex at all so I couldn't catch it again I'm just confused on why didn't the medicine work? I'm 16 weeks pregnant. Anyone else gone through this?