Bug fix and an example