fix bug with tempo computation where passed in positions or offsets are negative