Remove warnings from example

Fixes #1590