Refine examples and fix panic error