issue #3118: removed two erroneous assignments by reference

fixes the "Only variables should be assigned by reference" runtime errors from issue #3118