modified encode issue