Fix segmentation fault with --html