fix panel index bug