Fix window size calculation
Merge pull request #68 from fayep/master

Fix window size calculation