regexp memory bug fixed