Adding a fix to the comparator to make it less flappy