More fixes throughout the engine