fixing bug with removing items