fix is_virtual condition