Fixed script for update environment