Bugfixes, populate function not working