added a quick hack to prevent memory over-allocation in Module:getParameters().  It still needs to be fixed.