Fixed typos and improved regex