Fix  CLI issues caused by wrong types
Merge remote-tracking branch 'upstream/master'