correcting bug in windowing code.