Fix how the output of the list command is handled