Revert "Continuation of the Permalinks fix."

This reverts commit 3ca97b3b032c8c7d9b188d0ac9d6ffa54861a26c.