Fixes for pyqt5 support