A payroll blunder affected more than 16,000 current and former staff.