bugfix: percentage was not being calculated correctly