added bug fix for the date