Fixed the index selecting serial state machine