Update script

Fixed issues