support nodata & fix bug