Fixing bug which caused script to fail if event list included a blank line.