[DEV] Some improvement to help registering perm.