javascript fixes, ingredient index fixed