Fixed incorrect use of save in update and upsert