Except that the ban does not include all nations with majority Muslim populations.  It does, however, include all nations in which US soldiers have engaged in combat.  Seems to that we have to be very careful not to let in people who shot, or are willing to shoot, at Americans.