win function fix.