Fix FindBugs warnings, fix duplicate user adding, support multiple type aggregation