Fix for text pasting bypassing the enforced limit