Fix #413
Fix #336
Merge remote-tracking branch 'origin/master'