fix handling of values
log exceptions