Added an extra check to prevent multiple saves of the same item