corrected empty date issue, fixes #41