Fixed bug by changing the gridModel when the user inputs a number.