fixing bug in populous js