VS compilation partially fixed