Fixed loading bug with selected sample index and adding too many recording events