Improved version of update script (LEV-112)