avoid crashing when no track is playing
fix broken js