fixed encoding + db