Issue #16 fix
Merge pull request #17 from urmaul/master

registerScript() chain fix