Fixed a bug in processTracks