Fixing bug where devices may not be found.