Reinstated input length check.