Correct postgres encoding issues