Fixed SEGV on regex test.