Update registry.js

Fix clearing timeout