Changed nx to gridSizeX