fixing enconde problem