encode fix
fixed new bug