Fixed a bug where the time stops updating when the screen is turned off.