fixed crash in regex