Added more strict nodata selection and check