correct static cast in win build