Bugfix on page change