fix bug in get of regex from context