Fixes for example.js

Follow-up changes from #999