Fixed bug in retrieveConversations function