Fixed indexing bug in seq_out