Take the length of the messages into account