Internal controller fix: if max_frames reached, it should call EpisodeEnd to store experiment data.