Fix a few bugs found when trying to run grocery-sync with native api