handle situations going out of boundary (quine.40col now works!)