fixing bug with clearing environment on failed or cancelled updates