fixes for windows (flex) @julianlam