encode problem fixed