update xmris patch and perm bug fixed