fixed issue 871, comparator operation

fixed the bug in raster local comparator operations. issue number 871