Fixed a critical moduleDir bug.