fix compatibility issues with Qt 5