Nevermind, I fixed it : I was running the pause script on the root node, which was set to process mode. All its childern are set to inherit mode, so they were running in process mode and were not pausing correctly.
Now, I've set the root node back to inherit mode and moved the pause code to a separate node and it now seems to be working correctly.