Fixes type in clusering algorithm