update spaces in pages