Some tweaks for Qt5