fixed duplicate ids in populate-sql