bug fix at number_of_messages