pass winsize correctly