Fix 'non-const lvalue reference cannot bind to a temporary'

Change-Id: Ic308a281f7b16c8924658be792216d3aba4444c5