fixed issue with embedVars()