Fixed DB connection encoding bug