Fix to earlier code for ics file