Input max length fix for issue #38