fixed setItem behavior