A.0.1 figure labels in Appendix

I have two issues:

1. The figures/tables in my appendix are being labeled `A.0.1` instead of `A.1`. I assume this is because of the convention in my document is `chapter.section.#`. How do I change this for the appendix only?
2. My bibliography is being considered at a higher level than the appendices and it's noticeable in the ToC and the pdf `hyperref` structure.

See my example (Contains LyX document and `.tex` export)

-
Great! Thanks for the tip. Any thoughts on why the bibliography is "including" the appendix? The page number of the bibliography in the TOC is better than any other page numbers and when you look at the bookmarks, you have to open Bibliography to see the appendices –  Dominik Apr 23 '11 at 23:17

Just change the line `\numberwithin{figure}{Chapter}` to `\numberwithin{figure}{chapter}` (chapter without capital C) and it should be fine.