fixed bug where RTC time was not getting set