Changed call_after in _ClassFactory method