Fix some issues between upstream code and metanota's one.
Merge remote-tracking branch 'origin/master'