fixing bug with UTF-8 codification in database