bugfix registration as AMD module.