Fixed the bug related to the bound inference on the loop.