fix detection to better