Fixed a bug in return statements of uniform_cost_edit and empirical_cost_edit methods