fix detection of