Fix #284.
Fix #285.
Merge remote-tracking branch 'upstream/master'