fix bug for warning