Qt UI: fix initialization of variables