Fix a bug in the player. Asynchronism between player and UI
Clean recorder code