Fixed index/serial selection problems due to a typo.

This completes issue #168.