Fix percentage calculation.

Doubles and stuff.

Signed-off-by: Tim Smart <tim@fostle.com>