Added missing curly brackets in example

This fixes #1544.