Fixed the undefined indexes on a fresh install. Also added a selectbox option change.

If the select array uses keys that are not numeric, use the non-numeric
key as the value. This makes it easier for developers to make a display
name and use a different ID internally.