Poll error when no devices attached

bug

Fixes a bug with polling when no devices are attached