fix RangeError exception in populate method
Merge pull request #18 from kutu/patch-3

fix RangeError exception in populate method