fixed index error on plugin saving