fixed device detection error