Fixes static pages when permalinks are active.

fixes #2938
- Fix `page === 1` occurences
- Fix ember logic