fixed round loop-end bug