fix bug in AutoHadd