fixed bug caused by inconsistent date objects across browsers