Fixed a bug for index in mixin.

Index in Mixin used to fail. Now it is okay.