Fixed overflow issues.