Fix for temporary being passed in by ref issue.