Fix bug in updateRegisteredModule() method