Fix a bug about use_perm