Fixes #675
Fixes #679
Fixes #672
Merge remote-tracking branch 'upstream/master'