fix switching between free form and auto scanning
fix merge conflict