added an additional filter that will select gems that will most closely complete a full recipe
fix nil error