fixed another bug in the tail (calc)