Added play button and fixed a state bug