Fixed an issue with Qt 5.1 and a couple of issues with Windows.