Some minor bugfixes for saving pages.