fix timing problems
fix clock period and resets