Fixing some bugs introduced by switching to Qt Designer code