Fixed issues with date