fixed date array bug