Fix #833
and another one
Merge remote-tracking branch 'upstream/master' into upstream