Fixed bug where module.wait states were detected as running legacy module.run syntax