Added fill value bounds check.