Gassy

So last month I had sex my whole fertile window period came late 3 days it wasn't heavy it was 4 days light normaly 7 days..well after it ended I been so gassy unlike all my other cycles I been tierd..well I took a pregnacy test 4 days ago it was vvf positive. .but I had my period how could that be? Is it me or im just crazy what is going on ?