Fix js error causing context not persisting on save