Fixed NoneType.lower() bug in cost mod