Fixes bug in type regex.