Fixed bugs in comparison operator for RangeNd and Tensor. Relates to #51