fixed register a module via define when amd enabled
minor updates