Is it ok to change brands?

I was prescribed a brand of isotretinoin called Isotane of 20mg and it was working just fine and my face almost cleared up. But I couldn't find that brand in my local pharmacy so I decided to go for the other brand with the same dosage and now I see a sudden spurt in my acne. I would hope this is just a co-incidence because this also happens to be the week I ate a lot of cheese (cheese causes acne spurt on me). Is this a just a co-incidence or should i not have changed the brand?