Fixed detection error