fix register_engine error