minor bug of warning detection