correct implementation of "try with auto_guess if first detection fails"