fixed problem with encoding