Fixed a bug in the reference shifting for NPT-TEE.
Added multiple pass optimization to hybridtee.py to ensure convergence.