Fix tmp reference