bug fix of attention