Fixed a small bug: square root of condition number should be used