Fix tests. Project cleanup caused resource leak problems which led to memory violation errors.