changed update script

Fixed other bugs as well