pyqt4 compatibility fix