fixed some bugs on install scripts