Fixed crash on bad regex