solve timer related bugs