attempt to fix zonal statistics calculation (#617)