Fixed a few bug in the install process.