Fix possible error if negative grid columns set