initialized dates before use (bug fix)