Fixing percentage calculation - it was mathematically incorrect