bug in theta computations