fixed error in QR calc of determinant