turn off rtc write
do some clean and fix