Fixed bug in estimate_rz for python