Fix bug with current page overriding