Fixing Crash related to AVD detection