install script
corrected a few bugs

Change-Id: I0a38d659ce6d93ba57d6ab6d6db388485206a313