Adding items to a global array to keep them in the scope and avoid errors when items are set in the table