r911: check before attempting adding
r912: very minor improvement
Merge branch 'dev'