fixed some precision problems.