removes bad reference, updates index metadata command ref