Fix a bug with auto