Solving problem with encode format