# Appendices in PDF Outline appear as children of first appendix and problem with headers

I have a problem similar to the one in Appendices in PDF Outline appear as childs of last section

But the solution hasn't worked for me, and I even get errors when I try to `\includepackage{bookmark}`.

So the problems are:

1. Appendices in the PDF outline appear as children of first appendix;

2. The PDF bookmark for the appendices points to the first two chapters;

3. At the references/bibliography the headers are set with the previous chapter values;

I've been all day trying to solve this and I just gave up.

-

You are loading `hyperref` too early. The problem occurs because you load it before `fncychap`. It goes away if you move `hyperref` after `fncychap` in the loading order in your style file.

`hyperref` should be loaded as latest package, with some exceptions, because it redefines a lot of macros of basic LaTeX and such used and redefined by other packages.

Regarding the exceptions, have a look at: Which packages should be loaded after hyperref instead of before.

-
Thank you @Stefan! Your answer worked for problem 1) and 2). I just had to had \phantomsection as suggested in link. But I still have problem 3) to solve. Could you help me with that to? Or it's better to do another post? –  Alexandre Rodrigues Nov 17 '11 at 19:03
@AlexandreRodrigues: Yes, please don't post several different questions within one question. 3) is very probably because of starred headings which don't update the head marks. There are solutions for this on the site, I recommend browsing/searching before asking a new question. –  Stefan Kottwitz Nov 17 '11 at 19:08