sex makes period extend ??

This is my second time having sex on what was supposed to be the last day of my period and once again light bleeding has extended and my period hasn't completely terminated. 
The first time it happened I had just started having sex so I thought my body needed to acclimatise so I had to take  a tablet once for three days to make my period end. 
It has happened once again though and I'm a little confused. 
Pls enlighten me and let me know if this has happened to anyone else