Fixed bug in extensions.js
Edited example