fix error for purchase index