Bugfix for PyQt 5.1 and below.