fix bugs and update syncTimeRate