resolve invice index error