Fix errors in populate rake task.