registerScript() chain fix

Issue #16 fix