[[ Bug 13644 ]] wait loop not being broken
Merge pull request #1267 from runrevsebastien/bugfix-13644

[[ Bug 13644 ]] wait loop not being broken