Bugfix with page destroying