Fixed the date not advancing bug