fixed an indexing bug,all good now