Fix #90 and CR #89