Fixes to alter_shop_pages_permalinks