fix bug when adding a new module

https://www.pivotaltracker.com/story/show/58471926