fix crasher where the analog pin index was wrong