Fixed initialization of engine