Fixed lots of bugs in installer.