Additional fix for #1007 to avoid null ecopts.