Fix call-time pass by reference removed bugs