fixed mainwidnow bug