Fix bug on modules registration