Changed memory-index-max to attempt to fix constant indexing