fix issue #7 : index of arrayOfSquare exceeds 4