Fix error in calculating the percentage change

Fixes #5