Fixed #320 (Exceptions thrown if DeviceDB is empty)