fix for sync with postgres