Fix db sync script