Fixed windows bug in exec