Fix a problem where a temporary result was being returned.