Added second buffer to main, fixed indexes