Use vector rather than circ buff
Fixed resize bug