Fix issue #28 (+ test in TestCtcFwdBwd)