Add error checking, improve pick code to not sort every time.
Add error checking, improve pick code to not sort every time.

thrig/scripts,princeofdarkness76/sial.org-scripts,princeofdarkness76/sial.org-scripts,thrig/scripts,thrig/scripts,thrig/scripts,thrig/scripts,princeofdarkness76/sial.org-scripts,princeofdarkness76/sial.org-scripts,princeofdarkness76/sial.org-scripts,thrig/scripts