added workaround for present mode bug in Windows