fix error in grabbing recipe index