bug fix in robust fitting