remove raisining of IndexOutOfRangeException
fix bug in equals operation for cubes