Fix  get value of "when"