Bug fix for gridline spacing