Fixed undefined no of days

Fixed this issue.