Fixes problem with db connection encoding.