moved roundoff correction