Try to fix NoneType error