Same fix as prev commit but for pyqt5