Fixed percentage computation, fixes #21