fixed bug with regex