fix detection issues