Fixed bug on min, max calculation in IRasterIO method. Now it works. But the IRasterIO query is too slow. There are some blocks than aren't properly unlocked. With big rasters, the code stops for any reason (maybe query timeout)