Fixed api call for windows