Fix issue #18 and updates example