Fixed bug on use of tee