fix for negative indexes in asastochastic count_settlement