Updated to Qt5 and fixed crash