Fixed an error where i had flipped am values: am = 0 should be automatic and am =1 manual