fixes bug 1002771 - bad dates