fix #490
fix #493
Merge remote-tracking branch 'origin/master' into 1.4.6