fix bug in check_values and add another test