fixed bug in window timeout
merge