fix uncaught exception for trying to get profile variables on windows