Fix error in schema index updating