Fix error: Call-time pass-by-reference has been deprecated