I have worked around this issue by assigning to %USERARG% and %PASSWORDARG% and referring to both instead of the single %ARGS%. But this feels very hacky. I don't think you should trim spaces when assigning strings to variables.