fix the permission condition.