fix context for permanent links