Time measuring related bugfixes.