Little changes to become compatible with Qt5