Fix bug that created one extra page on small windows