Fix a bug in the runonce module