fixing #13
Merge pull request #14 from lperrin/master

Correctly iterating over devices in stopAll