almost done with fixing clock bugs.