fixed bug in update script