Fix for permalinks getting 404 errors