Engines module resource leak fix