Coerce n to integer. Closes #407
Throw error in select for bad indexes.
Closes #348