fixed problem with trailing crap bytes when printing grid