fix handling of values