Period twice

So I had protected sex on the last day of my period and I was afraid something happened so I took the plan B pill and now I have my period again. Is this ok?