Fix several critical bugs in pywizard cli
Merge with remote master