Fix bug from previous commit. Also, suppress warnings due to overflow.
Fix bug from previous commit. Also, suppress warnings due to overflow.

The overflow is fixed through the statement that follows.

FrancoisRheaultUS/dipy,nilgoyyou/dipy,FrancoisRheaultUS/dipy,nilgoyyou/dipy