Fix bugs to switch after a day