fix panics in src/doc