fix for very short bytearrayinputs