Minor Permisison Fix

Fixed checking of max inputs to fix minor bugs.