Added some code to check if the index is an integer in the form alter.