fix rtc bug