fix Matrix index bug
fix Matrix index bug