Fix examples and warnings