Added limit for number of messages, id is passed with messages