Fixed typo in model regex matching function