Fixed "addItem" function