fixed an index issue