Handle ValueError that occasionally occurs.