Fixed the function addTrack