fixed issues with regex- works with v4.4.3