fix system.register bug