Fix guiEngine cleanup