fixed type of limit argument to get_messages