fixed bugs with auto