fixed a bug calculating percentage since last version