Wizard bug fixes

Fixes #1332
Fixes #1333 
This is a memory leak. This object is never freed.