Fix for issue #10. Not all APIs used upsert when needed.