Fixed the bugs related to check the bound consistency.