Minor improvement to module registration