fix http://www.zenphoto.org/support/topic.php?id=572503#post-783215
Fix #525
fix #524
Merge remote-tracking branch 'origin/master' into 1.4.6