add Jian's bugfix