Fix sending eos events and reduce the number of times the Recorder class is called