fixed onended track iteration