fix bug in 2 functions of sequencer.c (buffer index)