minor fixes like clock precision and minor bugs