making advanced permissions repeat options look nicer; fixing some misc advanced permission bugs