Fixing a bug in populate task, issue #2