birth control and TTC

i have a question for the whole month of may i was taking the birth control pill but before that i was always of and on it but not more than one year i am now trying TTC and i got a positive test June 26th the 31st i started to bleed and etc so i had a miscarriage and i am TTC do u guys recommend anything? does being on the pill two months ago make it harder is the pill still in my system for some reason?!