Fixed permit and allow arguments handling

* The permit and allow functions were not handling the variable length
arguments correctly. This corrects that behavior.