Fixes for clock source and improved test debug.