Added fix for bug that caused chapters to be skipped even if they contained invalid tikz or ps pictures