Fix saving strings to database