fixed clock issues
fixed clock division issue
fixed counter timing