Hmm it shouldnt restart. It depends how you ended it. If you placed your block into the portal, the portal should activate and once you enter it, it takes you to the next level. If you jumped too far maybe and got out of the screen, level would restart.