Fixing percentage calculation issues.