Fixed Upsert part.