manual merge of old EngineError branch