Fix FindBugs warnings + revert fix

Fix FindBugs warnings
Revert fix in Unique, caused undesired side effects