Fixed bug with date object checking.