fix crash with qt5 build