fix getPercentage within 0 - 1