Fix processing order bugs and add round counter