minor corrections in demo and sample code. Fixes #34