Why do you wanna keep this line ? If everything work well with the new way to set the module, i think you should delete it.
Btw why do you change the way to set the module inside the Api ?