Put Toolkit.register in code block.