Fix: AttributeError

Fix: AttributeError: 'NoneType' object has no attribute 'group'