fixed rounding errors which caused violations of parameter contraints