fix forward length bug