fixing detection algorithm