Solved an off-by-one bug in the dispatcher.