fixed null pointer, fixed message of duplicate to be more informative to the firemen
Merge origin/master