Fix for issue 112: off-by-one issues with panning.