Added check for $BRAND variable