add more stability on detection