Rationality of secondary classes