fixed nodata logic