This is not right. The ID and module should be set before parent constructor is called. Otherwise in `init`() the ID and module will not be available.

Why move the if-statement into the constructor?