fix a logic error in examine the value of 'percentage'.