Remove extra commas and pad the empty panel msgs