Added support for take_control() to work in windows