fix off-by-one issue with tick length