Prevent out of bounds array access
Check if deleteCharacters is called with a negative argument
Remove needless assignment statements added in ce03b8c
Confirm that ECH parameter is not a negative value