Retrieves messages correctly