Bug fixes, examples

Bug fixes, examples