Fixed multiple issues on older versions of Windows