fixes #3815 Null pointer Exception When try to add a Tag