Fixed bug in dimension of theta matrix