fix attention model bug