Fixed crash when loading wig object by index.