Fixed exception name and also a date comparison.