Also catch ValueError for the last entry