Fix off-by one error of cursor position
Fix hemiola test