fixed index bug at the ld plot