bug-fix - only update or create as required