Fixing bug encountered when having only one message returned by a fetch request