fixed annoying bug in computing insert length