Don't overwrite non-empty failReason
Fix bounds check (and warning)