Fix gridline issues for odd characters

Fixes for spaces and punctuation characters.