Fix appendix code