Fix drawing grid after lines