Made listMessages actually work