fixed bug in populating