Tweak auto commit code