fixing bugs with multi-gpu support. win build