fix 16-bit branch out-by-one error