Added additional date checking