I am studying English, and I came across this example.
In theory, international civil servants at the United Nations are prohibited from continuing to draw salaries from their own governments; in practice, however, some governments merely substitute living allowances for the paychecks of their employees, having been assigned to the United Nations.
This sentence does not convey the intended meaning since the modifier "having been..." modifies the subject of the second clause (i.e. "some governments" ).
Is it right to say that if I have a comma + an -ing modifier, such modifier modifies the entire setting clause?
A possible way to fix the sentence to match the intended meaning is this:
In theory, international civil servants at the United Nations are prohibited from continuing to draw salaries from their own governments; in practice, however, some governments merely substitute living allowances for the paychecks of their employees who have been assigned to the United Nations.
Now my other question is: what is the meaning conveyed if I leave out the comma?
Does "having been.." modifies "employees"? i.e. could I fix the sentence just by leaving out the comma between employees and having been?
Is it tre in general that if I don't have a comma then an -ing modifier modifies the preceding noun?