fixes for permalinks