Fix percent calculation