Fix the all-null input bug for cg
Fix the problem for igd and irls