fix RangeError exception in populate method