Check if devCount i above 0

This caused an IndexOutOfBoundsException