BUG: Corrected bug in tract_math to handle several tracts on input