fix autodir check