Fix bounds check, remove extraneous print statement