Qt5 compatibility fix