Correction on getPercent implementation