Removed incorrect code that added duplicated changes when checking a bound array.