Inout max length fix for issue #38