fixed reference before assignment error during module installation.