fixing issues with the in bounds checker