fix bug in warning