fix errors in populate script