Added tests
Fixed bug in set without id