Fixed adc bug