Use last grid column and/or row if your grid coordinates are out of bounds