Moved bug fix to another PR.
Removed distinct() method. It is not supported yet.