Fix bugs in parameter_estimation module