added check_flapping