fix bug which cause warning