refined auto mode, fixed issue #2